<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>14</cardCount>
<cardID>3765</cardID>
<listID>7813</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackset userlevel to 5global userLvlIn, stacks, paletteLoc, indexLocif "dItems 2.0" is not in resNameList("","theR") thenanswer "Dialoger has not yet been installed in Home. "¬¨&"Please use Help stack to install it first." with "DialogMaker Help"put 0 into userLvlIngo cd id 43652 of stack "DialogMaker Help"if the result is not emptythen go homeexit openStackend ifif item 4 of screenRect() <= 342 then hide menubarput the userLevel into userLvlInset userLevel to 5send "mouseUp"&&paletteLoc to bg btn "Tools"if indexLoc is not empty then send "mouseUp"&&indexLoc to bg btn "index"pass openStackend openStackon Progress txtOrPctif txtOrPct is a numberthen put "3‚óä"&round(txtOrPct) into txtOrPctelse put "2‚óä"&txtOrPct into txtOrPctget dContents("!Progress")if it <> 0 thenif txtOrPct is "2‚óäDismiss"then dChanger it,"0‚óäDismiss"else dChanger it, txtOrPctelse if txtOrPct <> "2‚óäDismiss" thenget Dialoger("!Progress"&return&"Orphan","3‚óäInactivate"&return&txtOrPct)end ifend Progresson suspendStackget the windowsrepeat with l = 1 to number of lines in itdChanger (line l of it)&return&"Hide"end repeatpass suspendStackend suspendStackon resumeStackput the windows into wListrepeat with l = 1 to number of lines in wListget dContents(line l of wList)if it is not 0 then dChanger it, "0‚óäShow"end repeatpass resumeStackend resumeStackon idleglobal pObjToUpdateif pObjToUpdate is not empty thenshowPict pObjToUpdateput empty into pObjToUpdateend ifpass idleend idleon toolHit dialog, itemHit, partHitglobal btn2Clickif partHit is not empty thenget "send mouseUp to bg btn"&"e&objText(itemHit,partHit)"edo itend ifend toolHiton showHit dialog, itemHit, partHitsend "showHit"&&dialog&","&itemHit&","&partHit to bg btn "show"end showHiton getIconHit dialog,isend "getIconHit"&&dialog&","&i to cd id 7060end getIconHiton helpvisual effect iris opengo "DialogMaker Help"end helpon closeStackglobal userLvlIn, paletteLoc, indexLocif userLvlIn is 0 then pass closeStack -- being bumpedset the userLevel to userLvlInput dContents("‚Ä¢thePalette",0,"Loc") into paletteLocput dContents("‚Ä¢index",0,"Loc") into indexLocget the windowsrepeat with l = 1 to number of lines in itdChanger (line l of it)&return&"Dismiss"end repeatunlock screenend closeStackfunction card2DialogRect cRectget rect of bg fld "DialogRect"put item 1 of cRect - item 1 of it into item 1 of dRectput item 2 of cRect - item 2 of it into item 2 of dRectput item 3 of cRect - item 1 of it into item 3 of dRectput item 4 of cRect - item 2 of it into item 4 of dRectreturn dRectend card2DialogRectfunction dialog2CardRect dRectget rect of bg fld "dialogRect"put item 1 of dRect + item 1 of it into item 1 of cRectput item 2 of dRect + item 2 of it into item 2 of cRectput item 3 of dRect + item 1 of it into item 3 of cRectput item 4 of dRect + item 2 of it into item 4 of cRectreturn cRectend dialog2CardRectfunction stackFileName stackNameif stackName is empty then put the long name of this stack into stackNameput AfterChar(quote,stackName) into stackNamedelete last char of stackNamereturn(stackName)end stackFileNamefunction DialogResources dNameif dName is empty thenput "DLOG"&&(bg fld dialogName) & return ¬¨& "DITL"&&(bg fld dialogName) & return into rListrepeat with l = 1 to number of lines in bg fld "objList"put line l of bg fld "objList" into objget GetFromScript(obj,"iType")if it is "pict"then put "PICT"&&(short name of obj) & return after rListelse if it is "icon"then put "ICON"&&(icon of obj) & return after rListelse if it is "cntl"then put "CNTL"&&GetFromScript(obj,"ID") & return after rListelse if it is "card"then put "PICT"&&(bg fld dialogName)& return after rListend repeatput bg fld "resourceList" after rListelseput dBreaker("",dName) into piecesif first word of pieces is "Error:" thenanswer piecesexit DialogResourcesend ifput "DLOG"&&dName & return ¬¨& "DITL"&&dName & return into rListrepeat with l = 2 to number of lines in piecesput item 7 of line l of pieces into theIDget item 1 of line l of piecesif it is "pict"then put "PICT"&&theID & return after rListelse if it is "icon"then put "ICON"&&theID & return after rListelse if it is "cntl"then put "CNTL"&&theID & return after rListend repeatend ifreturn rListend DialogResourcesfunction pathnameget long name of this stackreturn char 8 to 255 of beforeChar(":",it,"Last")&":"end pathnameon getCmdDescglobal cmds1,cmds2,cmds3,cmds4,cmds5,cmds6global cmds7,cmds8,cmds9,cmds10,cmds11,cmds12,cmds13,cmdDescsset cursor to watchput pathname()&"Dialoger Command Text" into fNameopen file fNamerepeat with i = 1 to 13do "put cmds"&i&&"into it2"read from file fName until returndelete last char of itdo "put unscrunch(it) into cmds"&iend repeatput empty into cmdDescsrepeat until it is emptyread from file fName for 16000put it after cmdDescsend repeatclose file fNameend getCmdDescon dialogOptionsglobal dResult, beenInOptionsput return into CRput true into beenInOptionsput "Modal" & CR &¬¨"Modeless" & CR &¬¨"Float" into PopUp1put (line 4 of bg fld "DialogRect" is empty) into autoLocput Dialoger("‚Ä¢Dialog Options"¬¨,"4‚óä"&autoLoc¬¨,"5‚óä"¬ autoLoc¬¨,"6‚óä"&(line 4 of bg fld "DialogRect")¬¨,"8‚óä"&(item 1 of line 5 of bg fld "DialogRect")¬¨,"10‚óä"&(line 6 of bg fld "DialogRect")¬¨,"12‚óäuserPop" && (line 7 of bg fld "DialogRect") & CR & PopUp1¬¨,"14‚óä"&(line 8 of bg fld "DialogRect")¬¨,"16‚óä"&(line 9 of bg fld "DialogRect")¬¨,"18‚óä"&(line 10 of bg fld "DialogRect")¬¨) into dResultcheckResult dResultif line 4 of dResultthen put empty into line 4 of bg fld "DialogRect"else put line 6 of dResult into line 4 of bg fld "DialogRect"put line 8 of dResult into item 1 of line 5 of bg fld "DialogRect"put line 10 of dResult into line 6 of bg fld "DialogRect"put line 12 of dResult into line 7 of bg fld "DialogRect"put line 14 of dResult into line 8 of bg fld "DialogRect"put line 16 of dResult into line 9 of bg fld "DialogRect"put line 18 of dResult into line 10 of bg fld "DialogRect"end dialogOptionsfunction metas objput empty into theMetasget textstyle of objif it <> "plain" thenrepeat with i = 1 to number of items in itput char 1 of item i of it after theMetasend repeatend ifget textalign of objif it is "left" then put empty after theMetaselse if it is "center" then put "M" after theMetaselse if it is "right" then put "R" after theMetasget (textHeight of obj)/((textsize of obj)*1.3)if it < 1.4 then put empty after theMetaselse if it < 1.8 then put "5" after theMetaselse if it < 2.2 then put "2" after theMetaselse if it < 2.7 then put "7" after theMetaselse put "3" after theMetasif GetFromScript(obj,"Scroll")then put "!" after theMetaselse put "." after theMetasreturn theMetasend metasfunction helpText objget script of objreturn char (offset("-- HelpText",it)+12) to 32000 of itend helpTexton indexHit dialog, iHit, pHitsend "indexHit"&&dialog&","&iHit&","&pHit to bg btn "index"end indexHiton deleteDialog rListif char 6 of rList is return then exit deleteDialogput "The resources you select below will be permanently deleted."¬¨&" Those not selected will be left alone."¬¨&" Remember that ICONs and PICTs are often shared by multiple dialogs,"¬¨&" while DLOGs, DITLs and CNTLs are not." into theTextget Dialoger("‚Ä¢DeleteList"¬¨,"4‚óäStyledText Geneva,9,."&return&theText¬¨,"3‚óäUserList Monaco,9,AnySelection" & return & rList)put line 3 of it into listItemsif line 2 of it is not empty then exit deleteDialogput stackfilename() into myNamerepeat with i = 1 to number of items in listItemsget (line (item i of listItems) of rList)Progress round(i/number of items in listItems*100)progress "Deleting"&&itResDelete myName, (char 1 to 4 of it),(char 6 to 99 of it)if the result is not emptythen get alert("Note","("&it&")"&&(the result),"OK")end repeatProgress "Dismiss"end deleteDialogon makeItemList dialog, theNameglobal dWideif dWide is empty then exit makeItemListset cursor to watchput dBreaker("",theName) into piecesput empty into theItemsrepeat with l = 2 to number of lines in piecesput line l of pieces into aPieceget type2Nice(item 1 of aPiece)if l > 10then put (l-1) &"‚óä"&it &&"‚Äú"&(item 7 to 99 of aPiece)&"‚Äù" & return after theItemselse put "¬†"&(l-1) &"‚óä"&it &&"‚Äú"&(item 7 to 99 of aPiece)&"‚Äù" & return after theItemsend repeatdChanger dialog, "","6‚óäNew"&return&theItems,"5‚óäItems in ‚Äú"&theName&"‚Äù"end makeItemListon setHelpText obj, newHelpput script of obj into theScriptget char 1 to (offset("-- HelpText",theScript)+11) of theScriptset script of obj to it&newHelpend setHelpTextfunction objText i,pget emptyif i=1 thenif p = 1 then get "push button"else if p = 2 then get "radio button"else if p = 3 then get "checkbox"else if p = 4 then get "editable text"else if p = 5 then get "static text"else if p = 6 then get "text"else if p = 7 then get "icon tool"else if p = 8 then get "pict tool"else if p = 9 then get "CNTL tool"else if p = 10 then get "popup"else if p = 11 then get "list"else if p = 12 then get "box"elseend ifelse if i = 2 thenif p = 1 then get "import"else if p = 2 then get "create"else if p = 3 then get "show"else if p = 4 then get "export"elseend ifelse if i = 3 thenif p = 1 then get "help"else if p = 2 then get "objector"else if p = 3 then get "index"elseend ifend ifreturn itend objTexton editCNTL firstTimeglobal obj, cList, fName, dirtyput true into dirtyput return into CRput "Push Btn" & CR &¬¨"Radio Btn" & CR &¬¨"Checkbox" & CR &¬¨"Scrollbar" & CR & "(-"&CR& ResNameList("","CDEF") into cListput GetFromScript(obj,"init") into initValput GetFromScript(obj,"min") into minValput GetFromScript(obj,"max") into maxValput GetFromScript(obj,"getsHit") into getsHitput GetFromScript(obj,"proc") into procget short name of objif it contains " id"&&id of obj then get emptyput Dialoger("‚Ä¢Control" & CR & "on controlHit"¬¨, "3‚óäDismiss"¬¨, "4‚óä"&getsHit¬¨, "6‚óäuserBox gray"¬¨, "10‚óäuserBox gray"¬¨, "11‚óä"&initVal¬¨, "12‚óä"&minVal¬¨, "13‚óä"&maxVal¬¨, "14‚óä"&it¬¨, "16‚óäuserPop"&&proc&",15,FixedWidth" & CR & cList¬¨) into dResultcheckResult dResultif line 2 of dResult is not empty thenif firstTime is true thenselect objdoMenu "clear button"choose browse toolend ifexit editCNTLend ifset name of obj to line 14 of dResultPutIntoScript obj,"init",(line 11 of dResult)PutIntoScript obj,"min",(line 12 of dResult)PutIntoScript obj,"max",(line 13 of dResult)PutIntoScript obj,"getsHit",(line 4 of dResult)PutIntoScript obj,"proc",(line 16 of dResult)if line 3 of dResult is not empty thengo this cdposObj objend ifend editCNTLon controlHit dialog, iHitif iHit= 16 thenget dContents(dialog,16)if it is in "Push Btn|Radio Btn|Checkbox"then dChanger dialog,"11‚óä0","12‚óä0","13‚óä1"else if it is "Scrollbar"then dChanger dialog,"11‚óä1","12‚óä1","13‚óä100"end ifend controlHitfunction alert lvl, txt, pushBtn1, pushBtn2, pushBtn3global dResultif lvl is not in "Caution,note,stop" thenbeepexit alertend ifput return into CRif pushBtn2 is empty thenput Dialoger("‚Ä¢Alert"¬¨, "1‚óä"&pushBtn1 & return & "CancelItem"¬¨, "2‚óähide"¬¨, "3‚óähide"¬¨, "4‚óä"&lvl¬¨, "5‚óä"&txt) into dResultelse if pushBtn3 is empty thenput Dialoger("‚Ä¢Alert"¬¨, "1‚óä"&pushBtn2 ¬¨, "2‚óä"&pushBtn1 & return & "Default"¬¨, "3‚óähide"¬¨, "4‚óä"&lvl¬¨, "5‚óä"&txt) into dResultelseput Dialoger("‚Ä¢Alert"¬¨, "1‚óä"&pushBtn3 ¬¨, "2‚óä"&pushBtn2 ¬¨, "3‚óä"&pushBtn1 & return & "Default" & return & "Dismiss" ¬¨, "4‚óä"&lvl ¬¨, "5‚óä"&txt) into dResultend ifif first word of dResult is "Error:"then exit to HyperCardrepeat with i = 1 to 3get line i of dResultif it is not empty then return itend repeatend alerton rebuildObjListput empty into bg fld "objList"put empty into bg fld "itemList"set cursor to watchrepeat with b = 1 to number of cd btnsget "cd btn id"&&(id of cd btn b)put it & return after bg fld "objList"put niceObj(it) & return after bg fld "itemList"end repeatrepeat with f = 1 to number of cd fldsget "cd fld id"&&(id of cd fld f)put it & return after bg fld "objList"put niceObj(it) & return after bg fld "itemList"end repeatdelete last char of bg fld "objList"delete last char of bg fld "itemList"end rebuildObjListon deleteCarddeleteDialog DialogResources()pass deleteCardend deleteCardon visitHomeend visitHomeon newCardput return into CRput (rect of bg fld "dialogRect") ¬¨& CR & "1" ¬¨& CR & "false"¬¨& CR¬¨ --loc& CR¬¨ --hit& CR¬¨ -- err& CR & "Modal"¬¨into bg fld "dialogRect"put "Untitled" into bg fld "DialogName"pass newCardend newCardon mouseDownput shiftKey() into theShiftKeyglobal objSelection, prevSelectionget word 1 to 2 of the targetif it is "card button"then moveItem "cd btn id"&&(id of the target), theShiftKeyelse if it is "card field"then moveItem "cd fld id"&&(id of the target), theShiftKeyelse if the target is "bkgnd field"&"e&"dialogRect""ethen moveDialogelse put empty into objSelectionend mouseDownon moveItem obj,theShiftKeyglobal objSelection, prevSelection, dirty, anchorObjif objSelection is empty thenput obj into objSelectionelse if obj is not in objSelection thenif theShiftKey is not downthen put obj into objSelectionelse put obj&return before objSelectionelse if theShiftKey is down thenput offset(obj,objSelection) into pdelete char p to p+length(obj) of objSelectionend ifget dragger(objSelection)if it is true thenif number of lines in objSelection = 1 thensend "editItem" to objSelectionelseput objSelection into prevSelectionput last line of objSelection into anchorObjsend "mouseUp" to bg btn "objector"end ifelse if it is "delete" thenrepeat with o = 1 to number of lines in objSelectiondo "select"&"e&(line o of objSelection)"eif word 2 of line o of objSelection is "btn"then doMenu "clear button"else doMenu "clear field"end repeatchoose browse toolelse put true into dirtyidleend moveItemfunction inParm iNoif iNo > 0 thenif iNo > number of lines in bg fld "objList" then return emptyput line iNo of bg fld "objList" into objput getFromScript(obj,"iType") into typeif type is "user" then put getFromScript(obj,"uType") into typeif type is in "btn,rad,chk,icon,cntl" thenreturn emptyelse if type = "pict" thenget getFromScript(obj,"grid")if it <> "0,0"then return "PictButton"&&it&","&GetFromScript(obj,"logic")else return emptyelse if type = "stat" thenif getFromScript(obj,"Fancy") thenreturn "StyledText"&&(textfont of obj)&","&(textsize of obj)¬¨&","&Metas(obj)else return emptyelse if type = "edit" thenif getFromScript(obj,"Prot") thenreturn "protected"else if getFromScript(obj,"Fancy") thenreturn "StyledText"&&(textfont of obj)&","&(textsize of obj)¬¨&","&Metas(obj)else return emptyelse if type = "pop" thendo "get"&&objput "userPop" into line 1 of itreturn itelse if type = "list" thendo "get"&&objput "userList"&&(textFont of obj)&","&(textSize of obj)&return before itreturn itelse if type = "box" thenget getFromScript(obj,"grid")if it <> "0,0"then return "userButton"&&it&","&GetFromScript(obj,"logic")put "userBox"&&GetFromScript(obj,"bPen")¬¨&","&GetFromScript(obj,"bFill")¬¨&","&GetFromScript(obj,"bMode") into oStrget short name of objif " id " is not in it then put return & it after oStrreturn oStrelse if type = "text" thendo "put"&&obj&&"into txt"return "UserText"&&(textfont of obj)&","&(textsize of obj)¬¨&","&Metas(obj)&return&txtend ifelse -- Dialogput bg fld "DialogName" into theArgget line 4 of bg fld "DialogRect"if it is not emptythen put return & "Loc"&&it after theArgget item 1 of line 5 of bg fld "DialogRect"if it is not emptythen put return & "on"&&it after theArgget line 6 of bg fld "DialogRect"if it is not empty then put return & "onError"&&it after theArgget line 7 of bg fld "DialogRect"if it is not "Modal" then put return & it after theArgget line 8 of bg fld "DialogRect"if it is not empty then put return & "DefaultItem"&&it after theArgget line 9 of bg fld "DialogRect"if it is not empty then put return & "CancelItem"&&it after theArgget line 10 of bg fld "DialogRect"if it is not empty then put return & "KeyScrollItem"&&it after theArgreturn theArgend ifend inParmon moveDialogglobal objSelection, dirtyput empty into objSelectionput topLeft of the target into startCornerTLput bottomRight of the target into startCornerBRput loc of the target into startLocput Dragger(the target) into dblClickput item 1 of topLeft of bg fld "dialogRect" ¬¨- item 1 of startCornerTL into dHput item 2 of topLeft of bg fld "dialogRect" ¬¨- item 2 of startCornerTL into dVput item 1 of bottomRight of bg fld "dialogRect" ¬¨- item 1 of startCornerBR - dH into dWidthput item 2 of bottomRight of bg fld "dialogRect" ¬¨- item 2 of startCornerBR - dV into dHeightif (dH <> 0 or dV <> 0) ¬¨and dWidth = 0 ¬¨and dHeight = 0 ¬¨and (number of cd btns + number of cd flds > 0) thenget alert("Note", "Move contents of dialog too?", "Yes", "No", "Cancel")if it is "Cancel" thenset topLeft of the target to startCornerTLset bottomRight of the target to startCornerBRexit moveDialogelse put true into dirtyif it is "no" then exit moveDialogput true into dirtyrepeat with l = 1 to number of lines in bg fld "objList"put line l of bg fld "objList" into objif obj contains "bg fld" then next repeatget topleft of objadd dH to item 1 of itadd dV to item 2 of itset topleft of obj to itend repeatchoose select tooldrag from startCornerTL to startCornerBRdrag from startLoc to loc of bg fld "dialogRect"choose browse toolend ifif dblClick is true then send editItem to bg fld "dialogRect"idleend moveDialogon opencardglobal prevSelection, objSelection, anchorObj,dirtyput bg fld "dirty" into dirtyget line 1 of bg fld "dialogRect"if it is not empty then set rect of bg fld "dialogRect" to itput empty into prevSelectionput empty into objSelectionput empty into anchorObjget dContents("‚Ä¢Index")if it is not 0 thendChanger it,"2‚óäSelectText"&&(bg fld "DialogName")MakeItemList it, (bg fld "DialogName")end ifget dContents("About This Dialog")if it is not 0 then dChanger it,"3‚óä"&(bg fld "About")get line 1 of bg fld "dialogRect"if it is not empty then set rect of bg fld "dialogRect" to itunlock screenpass openCardend openCardon closeCardglobal dirty, userLvlIn,exampleWindowif userLvlIn is 0 then pass closeCardput dirty into bg fld "dirty"put rect of bg fld "dialogRect" into line 1 of bg fld "dialogRect"lock screenget dContents("About This Dialog",3)if (it is not empty) and (word 1 of it is not "Error:")then put it into bg fld "about"set name of this cd to bg fld "DialogName"if exampleWindow <> empty then dChanger exampleWindow,"0‚óäDismiss"end closeCardfunction shortFileName freturn afterChar(":",f,"Last")end shortFileNameon posObj oglobal objRect,objLoc,objWidth,objHeight,objput return into CRput line 1 of o into objif obj is empty then exit posObjget dContents("Position")if it <> 0 then posHit it, 0 elseget Dialoger("‚Ä¢Position" & CR & "on posHit"¬¨,"0‚óäFont Geneva" & CR & "FontSize 10"¬¨, "11‚óäuserBox gray", "0‚óäTitle Position")if word 1 of it is "Error:" then answer itend ifend posObjon posHit dialog,iglobal objRect,objLoc,objWidth,objHeight,objif i=0 thenput rect of obj into objRectput loc of obj into objLocput width of obj into objWidthput height of obj into objHeightdChanger dialog,""¬¨, item 2 of objRect & return & "Select 1,32000"¬¨, item 1 of objRect¬¨, item 4 of objRect¬¨, item 3 of objRect¬¨, item 1 of objLoc¬¨, item 2 of objLoc¬¨, objWidth¬¨, objHeightelse if i>=3 and i<=10 thenget dContents(dialog,i)if i = 3 then --Topif it >= item 4 of objRect thenbeepexit posHitend ifput it into item 2 of objRectset rect of obj to objRectelse if i = 4 then --Leftif it >= item 3 of objRect thenbeepexit posHitend ifput it into item 1 of objRectset rect of obj to objRectelse if i = 5 then --Botif it <= item 2 of objRect thenbeepexit posHitend ifput it into item 4 of objRectset rect of obj to objRectelse if i = 6 then --Rightif it <= item 1 of objRect thenbeepexit posHitend ifput it into item 3 of objRectset rect of obj to objRectelse if i = 7 then --LocHif it < 0 or it > 512 thenbeepexit posHitend ifput it into item 1 of objLocset loc of obj to objLocelse if i = 8 then --LocVif it < 0 or it > 342 thenbeepexit posHitend ifput it into item 2 of objLocset loc of obj to objLocelse if i = 9 then --Widthif it < 0 thenbeepexit posHitend ifput it into objWidthset width of obj to objWidthelse if i = 10 then --Heightif it < 0 thenbeepexit posHitend ifput it into objHeightset height of obj to objHeightend ifput rect of obj into objRectput loc of obj into objLocput width of obj into objWidthput height of obj into objHeightdChanger dialog,"", item 2 of objRect, item 1 of objRect¬¨, item 4 of objRect, item 3 of objRect, item 1 of objLoc¬¨, item 2 of objLoc, objWidth, objHeightend ifend posHiton checkResult rif first word of r is "Error:" then boom rend checkResulton boom rsnget alert("stop",rsn,"Cancel")exit to hypercardend boomfunction getFromScript obj, labelput "-- "&label&": " into fullLabelput script of obj into theScriptget offset(fullLabel,theScript)if it is not 0 thenreturn (char length(label)+6 to 32000¬¨of BeforeChar(return,char it to 9999 of theScript))elsedo "put return"&label&"(obj) into newValue"putIntoScript obj, label, newValuereturn newValueend ifend getFromScriptfunction returnIType objget style of objif name of obj contains "card button" thenif it is "transparent" then return "icon"else if it is "opaque" thenif icon of obj = 0then return "pict"else return "icon"else if it is "rectangle" thenif icon of obj = 0then return "pict"else return "icon"else if it is "roundRect" then return "btn"else if it is "radioButton" then return "rad"else if it is "checkbox" then return "chk"else return "????"else if name of obj contains "card field" thenif it is "scrolling" then return "user"else if it is "shadow" then return "user"else if it is "rectangle" thenif textFont of obj is "chicago"then return "edit"return "user"else if it is "opaque" thenif textFont of obj is "chicago"then return "stat"return "user"else if it is "transparent" then return "user"end ifend returnITypefunction returnUType objget style of objif it is "scrolling" then return "list"else if it is "shadow" then return "pop"put objdo "get"&&objreturn "box"end returnUTypefunction returnBPenreturn "Black"end returnBPenfunction returnProtreturn "false"end returnProtfunction returnScrollreturn "false"end returnScrollfunction returnTPenreturn "None"end returnTPenfunction returnBFillreturn "None"end returnBFillfunction returnBModereturn "Copy"end returnBModefunction returnGetsHit objreturn "true"end returnGetsHitfunction returnInitreturn 1end returnInitfunction returnProcreturn "Scrollbar"end returnProcfunction returnMinreturn 1end returnMinfunction returnIDreturn 0end returnIDfunction returnGridreturn "0,0"end returnGridfunction returnLogicreturn "Push"end returnLogicfunction returnMaxreturn 100end returnMaxfunction returnFancyreturn falseend returnFancyon putIntoScript obj, label, valueput "-- "&label&": " into fullLabelput script of obj into theScriptif theScript contains fullLabel thenrepeat with l =1 to number of lines in theScriptif line l of theScript contains fullLabel thenput fullLabel&value into line l of theScriptexit repeatend ifend repeatelseput fullLabel&value&return before theScriptend ifset script of obj to theScriptend putIntoScripton objectorHit dialog,iglobal anchorObj,theScript,objSelection, prevSelectionif i = 0 thenput empty into listCmdput empty into theScriptrepeat with l = 1 to (number of lines in prevSelection)put "SelectText"&&NiceObj(line l of prevSelection)¬¨& return after listCmdend repeatif listCmd is not empty thendelete last char of listCmddChanger dialog,"8‚óä"&listCmd,"9‚óäHideScroll"checkResult result()end ifelse if i = 1 thenput dContents(dialog,8) into theLinesput empty into prevSelectionrepeat with i = 1 to number of items in theLinesput item i of theLines into lput line l of bg fld "objList" & return after prevSelectionend repeatdelete last char of prevSelectionelse if i = 8 thenget dContents(dialog,8)if number of items in it is 1 thenput line (it) of bg fld "objList" into anchorObjelseif it is empty then put it into anchorObjend ifelse if i = 32 thenask "Script to perform for each selected object: (use the word OBJ to refer to the object)" with theScriptput it into theScriptend ifend objectorHitfunction niceObj objif obj is not in bg fld "objList" and obj is not "bg fld id 48" thenbeepreturn ""end ifput short name of obj into theNameif theName contains " id"&&id of obj then put empty into theNameget getFromScript(obj,"iType")if it is "user" then get getFromScript(obj,"uType")if it is in "btn,rad,chk,icon,pict,cntl" thenreturn type2Nice(it,obj)&"e&(theName)"eelse if it is in "edit,stat,text,list" thendo "put"&&obj&&"into txt"return type2Nice(it,obj)&"e&(word 1 to 4 of line 1 of txt)"eelse if it is "pop" thendo "put"&&obj&&"into txt"return type2Nice(it)&"e&(line 2 of txt)"eelse if it is "box" thenget type2nice(it)&&"("&GetFromScript(obj,"bPen")&" pen, "¬¨&GetFromScript(obj,"bFill")&" fill)"if theName is not emptythen put " ""e&(short name of obj)"e after itreturn itelse return type2Nice(it)end niceObjfunction type2Nice type, objif type = "btn" then return "Button"else if type = "rad" then return "Radio Button"else if type = "chk" then return "Checkbox"else if type = "icon" then return "Icon"else if type = "pict" then return "Picture"else if type = "cntl" thenif obj is empty then return "Custom Control"else return "Custom"&&GetFromScript(obj,"Proc")else if type = "edit" thenif obj is empty then return "Editable Text"if GetFromScript(obj,"Fancy") thenif GetFromScript(obj,"Scroll")then return"Scrolling Edit Text"else if GetFromScript(obj,"Prot")then return "Protected Editable Text"else return "Styled Editable Text"else return "Editable Text"else if type = "stat" thenif obj is empty then return "Static Text"if GetFromScript(obj,"Fancy") thenif GetFromScript(obj,"Scroll")then return"Scrolling Static Text"else return "Styled Static Text"else return "Static Text"else if type = "box" then return "Box"else if type = "pop" then return "PopUp"else if type = "list" then return "List"else if type = "text" then return "Text"else if type = "card" then return "Card Picture"else if type = "user" then return "User Item"end type2Nice-- ScriptEdit‚Ñ¢ Prefs:Monaco,9,65,18,472,600,5222,5222,50</script>